package com.ross.service.impl;

import com.ross.dao.UserMapper;
import com.ross.pojo.User;
import com.ross.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author RossZhang
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User findUserByName(String username) throws Exception {
        if (username!= null){
            return this.userMapper.selectByPrimaryKey(username);
        }
        return new User();
    }
}
